import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";

type homeResult = {
  page: any;
  result: any
};

/** 查询产品字典详情 */
export const productdictionaryselzdandzdinfo = (id?: string | number) => {
  return http.request<homeResult>("get", baseUrlApi(`/api/backend/productdictionary/selbdzdinfo/${id}`));
};



/** 查询产品字典列表 */
export const getproductdictionaryselpage = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/api/backend/productdictionary/selpage"), { data });
};

/** 修改产品字典 */
export const productdictionarychange = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/api/backend/productdictionary/change"), { data });
};
/** 新增产品字典 */
export const productdictionaryinsert = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/api/backend/productdictionary/insert"), { data });
};

/** 删除产品分类信息 */
export const productdictionarydelinfo = (userid?: string | number) => {
  return http.request<homeResult>("delete", baseUrlApi(`/api/backend/productdictionary/delinfo/${userid}`));
};


/** 删除产品字典绑定字段 */
export const productdictionarydelzd = (userid?: string | number) => {
  return http.request<homeResult>("delete", baseUrlApi(`/api/backend/productdictionary/delzd/${userid}`));
};